// VsCommon.hlsl

// macros
//#define OSVecMatrixMul(vOut, vIn, m) vOut = mul(vIn, m);

// ------------------------------------------------------------------------------------------------
// VARIABLES
// ------------------------------------------------------------------------------------------------

//uniform float4x4 g_mWorld;
//uniform float4x4 g_mInvTransWorld;

uniform float4x4 g_mWorldViewProj;

/*
uniform float4x4 g_mWorldView;
uniform float4x4 g_mViewProj;
uniform float4x4 g_mView;
uniform float4x2 g_mTextureTransform;   // Diffuse
uniform float4x2 g_mTextureTransform1;  // Diffuse2
uniform float4   g_vViewerPosition;
uniform float4   g_vViewerDirection;    // Eye vector
uniform float4   g_vAmbientColor;
uniform float4	 g_vSpecularColor;

uniform float4  g_vSnowShadowColor;
uniform float4  g_vSnowLightColor;
uniform float4  g_vPerpColor;
uniform float4  g_vParallelColor;

// Fog
uniform float4                  g_vFogConstants;
uniform float4                  g_vFogRange;
uniform float4                  g_vFogColor;
#define g_fFogStart             g_vFogConstants.x
#define g_fFogEnd               g_vFogConstants.y
#define g_fFogDensity           g_vFogConstants.z

// Skinning information
uniform float4 g_aSkinMatrices[VS_MAX_BONES * 3];

// Mixed
uniform float4					g_vMixed1;
#define g_fShininess			g_vMixed1.x
#define g_fSpecularStrength		g_vMixed1.y

uniform float4					  g_vMixed2;
#define g_fOcclusionMapContrast   g_vMixed2.x
#define g_fOcclusionMapBrightness g_vMixed2.y

uniform float4					g_vMixed3;

// mesh modifier
uniform float4          g_vMeshMdfParams1[3];
uniform float4          g_vMeshMdfParams2[3];

// fur
uniform float4             g_vFurInfo;
#define g_fFurProgression  g_vFurInfo.x
#define g_fFurTickness     g_vFurInfo.y


// Shadow
uniform float4x4			g_mShdWVPTMat;			// Transfrom from Object space to Shadow Space
uniform float3				g_vShdZAxis;			// Projector ZAxis in Object Space

// Mapping Scale & Bias
uniform float4				g_vMappingScaleBias;	// Next Gen Correction of mapping
uniform float4				g_vMappingRotation;
uniform float4				g_vMappingScaleBias2;	// second set
uniform float4				g_vMappingRotation2;

// Gloss Scale & Bias
uniform float4				g_vMappingScaleBiasGloss;	// Gloss setting
uniform float4				g_vMappingRotationGloss;

// Motionblur SFX
uniform float4              g_vReposition;          // transform to previous position
uniform float4              g_vMovement;            // movement vector between 2 positions
uniform float4              g_vBlurFactor;          // blur factor
uniform float4              g_vForcedColor;         // force color

// Projective texture
uniform float4x4			g_mProjectiveTexture;	// Transform from Object space to Texture Space
*/



// ------------------------------------------------------------------------------------------------
// STRUCTURES
// ------------------------------------------------------------------------------------------------


// The common vertex input structure
struct VSIN
{
    float4 Position         : POSITION;

#ifdef INPUT_COLOR0
    float4 Color0           : COLOR0;
#endif

#ifdef INPUT_COLOR1
    float4 Color1           : COLOR1;
#endif


#ifdef INPUT_BLENDINFO
    float4 BlendIndices     : BLENDINDICES;
    float4 BlendWeights     : BLENDWEIGHT;
#endif

#ifdef INPUT_NORMAL
    float3 Normal           : NORMAL;
#endif

#ifdef INPUT_TANGENT
    float4 Tangent          : TANGENT;
#endif

#ifdef INPUT_TEXCOORD0
    float2 TexCoord0        : TEXCOORD0;
#endif

#ifdef INPUT_TEXCOORD1
    float2 TexCoord1        : TEXCOORD1;
#endif

#ifdef INPUT_TEXCOORD2
    float4 TexCoord2        : TEXCOORD2;
#endif

#ifdef INPUT_TEXCOORD3
    float4 TexCoord3        : TEXCOORD3;
#endif

#ifdef INPUT_TEXCOORD4
    float4 TexCoord4        : TEXCOORD4;
#endif
};

